#[ ! -d ~/.config/tmux/plugins ] git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins
### Key binds ###

# Change prefix key to Ctrl + a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix

# Split panes using a and s
bind h split-window -h
bind v split-window -v
unbind '"'
unbind %

# Switch panes using Alt vim bindings without prefix
bind -n M-h select-pane -L
bind -n M-l select-pane -R
bind -n M-k select-pane -U
bind -n M-j select-pane -D

# Pane swapping
bind > swap-pane -D
bind < swap-pane -U

# Buffers
bind b list-buffers  # list paste buffers
bind p paste-buffer  # paste from the top paste buffer
bind P choose-buffer # choose which buffer to paste from

# Pane resizing
bind -n M-H resize-pane -L 2
bind -n M-J resize-pane -D 2
bind -n M-K resize-pane -U 2
bind -n M-L resize-pane -R 2

# Source tmux config
bind r source-file ~/.config/tmux/tmux.conf \; display-message "Reloading config..."

# Enable mouse mode (tmux 2.1 and above)
set -g mouse on

# General stuff
set -g xterm-keys on
set -s escape-time 10
set -sg repeat-time 500

# set zsh as default shell
set -g default-command /bin/zsh
set -g default-shell /bin/zsh

# Don't rename windows automatically
set-option -g allow-rename off
set -g base-index 1

### Themeing ###
set-window-option -g status-left " #S "
set-window-option -g status-right " %H:%M %d-%b-%y "
set-window-option -g window-status-format " #I: #W " # Window tabs
set-window-option -g window-status-current-format " #I: #W " # Current tab

### Plugins ###
# git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.config/tmux/plugins/tpm'

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-sensible'
#set -g @plugin 'IngoMeyer441/tmux-easy-motion'
